﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace IBS
{
    public class Manager
    {
        public String EMAIL { get; set; }
    }

    public class SaleOrderMsg 
    {
        public Int64 ID_RECORD { get; set; }
        public String DOC_NUMBER { get; set; }
        public DateTime DOC_DATE { get; set; }
        public Int64 COMPANY_KEY { get; set; }
        public String SUPNAME { get; set; }
        public Int64 LOCATION_KEY { get; set; }
        public String RCCODE { get; set; }
        public String SITENAME { get; set; }
        public Int64 ITEM_KEY { get; set; }
        public Decimal PRICE { get; set; }
        public Decimal ACTUAL_PRICE { get; set; }
        public Decimal TOTAL { get; set; }
        public Decimal TOTAL_ACTUAL { get; set; }

    }

    public class Item
    {
        public Guid GUID_RECORD { get; set; }
        public Int64 ITEMCODE { get; set; }
        public int SUPIBSCODE { get; set; }
        public int ITEMSTATCODE { get; set; }
        public string LONGNAME { get; set; }
        public string SHORTNAME { get; set; }
        public DateTime CHDATE { get; set; }  
    }

    public class Site
    {
        public Guid GUID_RECORD { get; set; }
        public int SITEIBSCODE { get; set; }
        public string SITENAME { get; set; }
        public string RCCODE { get; set; }
        public string ADDRESS { get; set; }
        public DateTime DATEUPDATE { get; set; }
    }
     
    public class Supplier
    {
        public Guid GUID_RECORD { get; set; }
        public int SUPIBSCODE { get; set; }
        public string SUPNAME { get; set; }
        public DateTime CHDATE { get; set; }
    }

    [FlagsAttribute]
    public enum IMPORTTYPE { RPO = 1, IbsImport = 2 };

        
    public class SaleOrder
    {
        public Guid OUTER_KEY { get; set; }
        public String DOC_NUMBER { get; set; }
        public DateTime DOC_DATE { get; set; }
        public Int64 COMPANY_KEY { get; set; }
        public Int64 LOCATION_KEY { get; set; }
        public Int32 LINECOUNT { get; set; }
        public Decimal TOTAL_AMOUNT { get; set; }
        public Decimal TAX_AMOUNT { get; set; }
        public String NOTE { get; set; }
        public IEnumerable<SaleOrderLine> SaleOrderItems { get; set; }
    }

    public class SaleOrderLine
    {
        public Int64 ITEM_KEY { get; set; }
        public Decimal PRICE { get; set; }
        public Decimal ACTUAL_PRICE { get; set; }
        public Decimal DISCOUNT { get; set; }
        public Decimal QUANTITY { get; set; }
        public Decimal TOTAL { get; set; }
        public Decimal TAX_TOTAL { get; set; }
        public Decimal TAX_RATE { get; set; }
        public int ORDER_NUM { get; set; }
    }    
}
